<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='Ext-data-DirectStore'>/**
</span> * @class Ext.data.DirectStore
 * @extends Ext.data.Store
 * &lt;p&gt;Small helper class to create an {@link Ext.data.Store} configured with an
 * {@link Ext.data.proxy.Direct} and {@link Ext.data.reader.Json} to make interacting
 * with an {@link Ext.Direct} Server-side {@link Ext.direct.Provider Provider} easier.
 * To create a different proxy/reader combination create a basic {@link Ext.data.Store}
 * configured as needed.&lt;/p&gt;
 *
 * &lt;p&gt;&lt;b&gt;*Note:&lt;/b&gt; Although they are not listed, this class inherits all of the config options of:&lt;/p&gt;
 * &lt;div&gt;&lt;ul class=&quot;mdetail-params&quot;&gt;
 * &lt;li&gt;&lt;b&gt;{@link Ext.data.Store Store}&lt;/b&gt;&lt;/li&gt;
 * &lt;div class=&quot;sub-desc&quot;&gt;&lt;ul class=&quot;mdetail-params&quot;&gt;
 *
 * &lt;/ul&gt;&lt;/div&gt;
 * &lt;li&gt;&lt;b&gt;{@link Ext.data.reader.Json JsonReader}&lt;/b&gt;&lt;/li&gt;
 * &lt;div class=&quot;sub-desc&quot;&gt;&lt;ul class=&quot;mdetail-params&quot;&gt;
 * &lt;li&gt;&lt;tt&gt;&lt;b&gt;{@link Ext.data.reader.Json#root root}&lt;/b&gt;&lt;/tt&gt;&lt;/li&gt;
 * &lt;li&gt;&lt;tt&gt;&lt;b&gt;{@link Ext.data.reader.Json#idProperty idProperty}&lt;/b&gt;&lt;/tt&gt;&lt;/li&gt;
 * &lt;li&gt;&lt;tt&gt;&lt;b&gt;{@link Ext.data.reader.Json#totalProperty totalProperty}&lt;/b&gt;&lt;/tt&gt;&lt;/li&gt;
 * &lt;/ul&gt;&lt;/div&gt;
 *
 * &lt;li&gt;&lt;b&gt;{@link Ext.data.proxy.Direct DirectProxy}&lt;/b&gt;&lt;/li&gt;
 * &lt;div class=&quot;sub-desc&quot;&gt;&lt;ul class=&quot;mdetail-params&quot;&gt;
 * &lt;li&gt;&lt;tt&gt;&lt;b&gt;{@link Ext.data.proxy.Direct#directFn directFn}&lt;/b&gt;&lt;/tt&gt;&lt;/li&gt;
 * &lt;li&gt;&lt;tt&gt;&lt;b&gt;{@link Ext.data.proxy.Direct#paramOrder paramOrder}&lt;/b&gt;&lt;/tt&gt;&lt;/li&gt;
 * &lt;li&gt;&lt;tt&gt;&lt;b&gt;{@link Ext.data.proxy.Direct#paramsAsHash paramsAsHash}&lt;/b&gt;&lt;/tt&gt;&lt;/li&gt;
 * &lt;/ul&gt;&lt;/div&gt;
 * &lt;/ul&gt;&lt;/div&gt;
 */

Ext.define('Ext.data.DirectStore', {
    /* Begin Definitions */
    
    extend: 'Ext.data.Store',
    
    alias: 'store.direct',
    
    requires: ['Ext.data.proxy.Direct'],
   
    /* End Definitions */

<span id='Ext-data-DirectStore-method-constructor'>    /**
</span>     * @param {Object} config (optional) Config object.
     */
    constructor : function(config){
        config = Ext.apply({}, config);
        if (!config.proxy) {
            var proxy = {
                type: 'direct',
                reader: {
                    type: 'json'
                }
            };
            Ext.copyTo(proxy, config, 'paramOrder,paramsAsHash,directFn,api,simpleSortMode');
            Ext.copyTo(proxy.reader, config, 'totalProperty,root,idProperty');
            config.proxy = proxy;
        }
        this.callParent([config]);
    }    
});
</pre>
</body>
</html>
